import request from '@/utils/request'
import {appConfig} from '../../config/app'

let service = appConfig.microServModules.goods + 'api/goodsInfo'

// 商品详情
export function queryGoodsInfoDetail (data) {
  return request(`${service}/queryGoodsInfoDetail`, {
    method: 'get', data: data
  })
}

// 商品列表
export function searchGoodsPage (data) {
  return request(`${service}/searchGoodsPage`, {
    method: 'post', data: data
  })
}

// 交易记录
export function tradeList (data) {
  return request(`${service}/tradeList`, {
    method: 'post', data: data
  })
}

// 成交人数
export function traderStatics (data, id) {
  return request(`${service}/traderStatics?goodsId=${id}`, {
    method: 'post', data: data
  })
}

// 商品推荐列表
export function recommendGoodsPage (data) {
  return request(`${service}/recommendGoodsPage`, {
    method: 'post', data: data
  })
}

// 查询商品证书信息
export function queryCertificateInfo (data) {
  return request(`${service}/queryCertificateInfo`, {
    method: 'get', data: data
  })
}
